package com.gwnet.rider.enums;

/**
 * 支付类型
 * @author
 */
public enum PayTypeEnum {

    /** 微信支付 */
    WECHAT_PAY(1,"微信支付"),

    /** 银行卡 */
    BANK_PAY(2,"银行卡支付"),
    ;


    private final Integer num;

    private final String payTypeName;

    public Integer value() {
        return num;
    }

    public String payTypeName() {return payTypeName;}

    PayTypeEnum(Integer num, String payTypeName){
        this.num = num;
        this.payTypeName = payTypeName;
    }

    public static PayTypeEnum instance(Integer value) {
        PayTypeEnum[] enums = values();
        for (PayTypeEnum statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
